package auto.base;

import com.kipa.base.BaseSpringIntegrationConfiguration;
import com.kipa.config.EnableMultipleDataSource;
import com.kipa.config.EnableRedis;
import com.kipa.env.EnableEnvironmentSwitch;
import com.kipa.env.EnvironmentType;
import com.kipa.mybatis.service.condition.EnvFlag;
import com.kipa.redis.RedisModel;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.PropertySource;


/**
 *  1. 业务默认的数据配置文件
 *  @PropertySource(value = "classpath:config/business.properties")
 *  2. 业务默认的环境： application.properties
 *  @EnableEnvironmentSwitch(env = EnvironmentType.DEFAULT)
 *  3. 多数据源并行操作
 *  @EnableMultipleDataSource(env = {EnvFlag.ENV1,EnvFlag.ENV2,EnvFlag.ENV3})
 *  4. 开启Redis 单例模式的redis
 *  @EnableRedis(model = RedisModel.CLUSTER)
 *  5. 开启消息功能
 *  @EnableRocketMQ(listenerScanPackage = "com.kipa.auto.test.auto.service.mq")
 *  6. 开启定时任务
 *  @EnableElasticJob
 *
 * @author weilong.ma
 * @date 2021/04/26
 */

@PropertySource(value = "classpath:config/business.properties")
@EnableEnvironmentSwitch(env = EnvironmentType.DEFAULT)
//@EnableMultipleDataSource(env = {EnvFlag.DEFAULT, EnvFlag.ENV1, EnvFlag.ENV2})
@EnableMultipleDataSource(env = {EnvFlag.DEFAULT})
@EnableRedis(model = RedisModel.CLUSTER)
@ComponentScans(value = {@ComponentScan("auto")})
public class SpringIntegrationConfiguration extends BaseSpringIntegrationConfiguration {
}